package com.yisen.study.shirostudy;

import java.io.File;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class Main {
    public static void main(String[] args) {
        File img = new File("D:\\qinsi\\faces");
        File embs = new File("D:\\qinsi\\embs");
        List<String> imgList = Arrays.stream(img.list()).map(str -> str.substring(0, str.indexOf("."))).collect(Collectors.toList());
        List<String> embsList = Arrays.stream(embs.list()).map(str -> str.substring(0, str.indexOf("."))).collect(Collectors.toList());
        System.out.println(imgList);
        System.out.println(embsList);
        embsList.forEach(str -> {
            if(!imgList.contains(str)){
                File file = new File("D:\\qinsi\\embs\\" + str + ".bin");
                file.delete();
            }
        });
    }
}
